<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8" />
		<title>订单分类列表</title>
		<meta name="keywords" content="" />
		<meta name="description" content="" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<% include("/admin/resource/common_css.html"){} %>
		<script language="javascript">   
		//登录按钮提交check

		//注册
		function loginRegister(){
			var flag=true;
			var p_cu_loginUserName = $("#loginUserName").val();
			var p_xu_loginpasswd = $("#loginPassword").val();
			
			if(!p_cu_loginUserName){
				$("#loginUserName").addClass("form_input_error");
				$("#telphoneErr").html("<font color='red'>手机号不能为空</font>");
				flag=false;
			}
			if(!p_xu_loginpasswd){
				$("#loginPassword").addClass("form_input_error");
				$("#loginPasswordErr").html("<font color='red'>密码不能为空</font>");
				flag=false;
			}
			
			if(flag){
				if(p_cu_loginid_out() && p_xu_loginPasswd_out() ){
					$("#registerform").html("提交注册中。。。");

					$("#registerform").submit();
					return;
				}
			}
			return flag;
		}
		//手机号码： onblur
		function xu_phone_out(){
			var telphone = $("#loginUserName").val();
			if(!telphone){
				$("#loginUserName").html("");
				return false;
			} 
			if(telphone.length < 11){
				
				$("#telphoneErr").html("<span class='pic_false_i'>手机号不足11位</span>");
				return false;	
			}
			var reg = new RegExp("/^[1][358]\d{9}$/");
			var status = true;
				if (reg.test(telphone)) 
					status = false;
				if(status){
				    var url="${ctx!}/admin/shop/login/checkTelphone?userName="+telphone;
				    $.ajax({  
				        async : false,  
				        cache:false,  
				        type: 'POST',  
				        url: url,//请求的action路径  
				        error: function () {//请求失败处理函数  
				            alert('请求失败');  
				        },  
				        success:function(result){ //请求成功后处理函数。    
				         
				         if(result==='false'){ 
				        	
				        	
				 			$("#telphoneErr").html("<font color='blue'>手机号可以使用</font>");
				 			return true;
				 		}else{
							$("#loginUserName").addClass("form_input_error");
							$("#telphoneErr").html("<span class='pic_false_i'>手机号码重复，请使用其他手机号码</span>");
							return false;
						}
				     }
				  }
				);	
				}	
		}  
		</script>
	</head>
	<body>
		<% include("/admin/common/header.html"){} %>
		<div class="main-container" id="main-container">
			<script type="text/javascript">
				try{ace.settings.check('main-container' , 'fixed')}catch(e){}
			</script>
			<div class="main-container-inner">
			  <% include("/admin/common/menu.html",{currentstr:"商品"}){} %>
				<div class="main-content">
				   <% include("/admin/common/breadcrumb.html",{breadaddfirst:"订单管理",breadaddsecond:"订单信息管理",breadaddthird:"买家管理信息列表"}){} %>
					<div class="page-content" id="content">
					<form method="post"  id="registerform" action="${ctx!}/admin/shop/login/register"  onsubmit="return loginRegister()">
			         <table>
			         <tr>
			         <td>
 						<span>手机号：</span><input type="text" class="" name="userName" id="loginUserName"  value="" onblur="xu_phone_out()"><span id="telphoneErr"></span><br/>
 						<span>密码：</span><input type="password" class="" name="password" id="loginPassword"  value="" onblur="p_cu_loginid_out()"><span id="loginPasswordErr"></span><br/>
 					</td>
 						</tr>
 						<tr>
 					<td>
 						<input id="loginRegister" class="" type="submit" value="用户注册" />
 					</td>
 					</tr>
					   </table>
					   </form>
				      <div id="chnllist" style="margin-top: 40px;">
						<table class="table table-striped table-bordered table-hover">

						</table>
						</div>
						<div id="bottomdiv">
				       		
					    </div>
				 </div><!-- /.page-content -->
				</div><!-- /.main-content -->
				<% include("/admin/common/acesetting.html"){}%>
			</div><!-- /.main-container-inner -->
		</div><!-- /.main-container -->
	<% include("/admin/common/footer.html"){} %>
	<% include("/admin/resource/common_js.html"){} %>
    <script type="text/javascript" src="${ctx!}/plugin/zTree/js/TreeGrid.js"></script>  
    <script type="text/javascript" src="${ctx!}/plugin/zTree/js/jquery.ztree.core-3.5.js"></script>   
     <script type="text/javascript" src="${ctx!}/js/admin/category.js"></script>   
	</body>
</html>
